﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Tradex.Messages {

    /// <summary>
    /// This enumeration contains all message codes for the messages Tradex uses.
    /// </summary>
    public enum MessageCode {

        /// <summary>
        /// Indicates a missing MessageCode - this is invalid for any message actually existing.
        /// </summary>
        None = 0,

        /// <summary>
        /// A ping message is a timing request, to be answered with a corresponding Pong.
        /// </summary>
        Ping = 0x0001,

        /// <summary>
        /// A Pong message is a response to a Ping.
        /// </summary>
        Pong = 0x0002,

        /// <summary>
        /// Indicates the message is a response for a historical chain request. This is a container message.
        /// </summary>
        RequestResponse = 0x0003,

        /// <summary>
        /// Creates a LogEntry
        /// </summary>
        LogEntryCreate = 0x0004,

        /// <summary>
        /// Requests an Instrument
        /// </summary>
        InstrumentRequest = 0x0010,

        /// <summary>
        /// Updates an Instruments reference information.
        /// </summary>
        InstrumentUpdate = 0x0011,

        /// <summary>
        /// Requests instrument activity updates.
        /// </summary>
        InstrumentActivityRequest = 0x0014,

        /// <summary>
        /// Updates instrument activity.
        /// </summary>
        InstrumentActivityUpdate = 0x0015,
        
        /// <summary>
        /// Requests order creation.
        /// </summary>
        OrderCreationRequest = 0x0016,

        /// <summary>
        /// Requests order modification.
        /// </summary>
        OrderModificationRequest = 0x0017,

        /// <summary>
        /// Responsds to order modification.
        /// </summary>
        OrderModificationResponse = 0x0018,

        /// <summary>
        /// Orders update.
        /// </summary>
        OrdersUpdate = 0x0020,

        /// <summary>
        /// Order update.
        /// </summary>
        OrderUpdate = 0x0030,

        /// <summary>
        /// Accounts update.
        /// </summary>
        AccountsUpdate = 0x0040,

        /// <summary>
        /// Account Update.
        /// </summary>
        AccountUpdate = 0x0041,

        /// <summary>
        /// Accounts request.
        /// </summary>
        AccountsRequest = 0x0042,

        /// <summary>
        /// Position update.
        /// </summary>
        PositionUpdate = 0x0060,

        /// <summary>
        /// Positions update.
        /// </summary>
        PositionsUpdate = 0x0061,

        /// <summary>
        /// Connection update.
        /// </summary>
        ConnectionUpdate = 0x0080

    }
}
